using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class WinPanel : BasePanel
{
    static readonly string path = "UI/Panel/WinPanel";
    public WinPanel() : base(new UIType(path)) { }
    public override void OnEnter()
    {
        PlayerData.coinsforskill += 2;
        PlayerData.coninsfortalent += 2;
        PlayerData.talentchangetimes = 3;
        TalentData.NewTalents();
        TalentData.possibility3 += 5;
        TalentData.possibility2 += 15;
        PlayerData.level++;
        EnemyData.damageratio += 0.2f;
        EnemyData.healthratio += 0.2f;
        uitool.GetOrAddComponentInChildren<Button>("ExitButton").onClick.AddListener(() =>
        {
            panelmanager.PopAll();
            GameRoot.Instance.scenesystem.SetScene(new MapScene());
        });
    }
}
